<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('在制品按工步片数时长统计列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                数据分类：<select name="dataClassify" th:with="type=${@dict.getType('data_classify')}">
                                    <option value="">请选择</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <label>卡号：</label>
                                <input type="text" name="lotId"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="query()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>
            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="report:wipstageqtysta:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-bordered" style="white-space: nowrap;">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">

        var prefix = ctx + "report/wipstepqtysta";
        var tableinit = true;

        var columns = [
            {
                field: 'NO1',
                align : 'center',
                title: 'NO',
                formatter: function (value, row, index) {
                    return $.table.serialNumber(index);
                }
            },
            {
                field: 'lotId',
                align : 'center',
                title: '卡号'
            },
            {
                field: 'stageId',
                align : 'center',
                title: '工段名称'
            },
            {
                field: 'stageDsc',
                align : 'center',
                title: '工段描述'
            },
            {
                field: 'stepName',
                align : 'center',
                title: '工步名称'
            },
            {
                field: 'stepDesc',
                align : 'center',
                title: '工步描述'
            },
            {
                field: 'qty',
                align : 'center',
                title: '片数'
            },
            {
                field: 'runActualTime',
                align : 'center',
                title: 'run实际时长(分钟)'
            },
            {
                field: 'runStandardTime',
                align : 'center',
                title: 'run标准时长(分钟)'
            },
            {
                field: 'waitActualTime',
                align : 'center',
                title: 'wait实际时长(分钟)'
            },
            {
                field: 'waitStandardTime',
                align : 'center',
                title: 'wait标准时长(分钟)'
            }
        ];

        var options = {
            url: prefix + "/list",
            exportUrl: prefix + "/export",
            modalName: "在制品按工步片数时长统计",
            showSearch: false,
            showRefresh: false,
            showToggle: false,
            showColumns: false,
            pagination: false,
            columns: columns
        };

        $(function() {

        });

        function query() {
            if (tableinit) {
                $.table.init(options);
                tableinit = false;
            } else {
                $.table.search();
            }
        }
    </script>
</body>
</html>